export default {
  data () {
    return {
      pData: {
        currentPage: 1,
        pageSizes: [10, 20, 50],
        pageSize: 10,
        total: 0,
        layout: "total, prev, pager, next, sizes, jumper"
      }
    }
  },
  methods: {
    handleSizeChange(pageSize, callback) {
      this.pData.currentPage = 1;
      this.pData.pageSize = pageSize;
      callback ? callback() : this.getData();
    },
    handleCurrentChange(currentPage, callback) {
      this.pData.currentPage = currentPage;
      callback ? callback() : this.getData();
    }
  }
}